#coding=utf-8
from django import template
register = template.Library()

def permission(value):
    if value == 'P':
        return '业务员'
    elif value =='A':
        return '管理员'
    else:
        return '未分级'
def valid(value):
    if value :
        return '是'
    else :
        return '否'
def gender(value):
    if value=='F':
        return '女士'
    else:
        return '先生'

    
register.filter('permission', permission)
register.filter('valid', valid)
register.filter('gender', gender)